package com.mjl.shops.base;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.mjl.shops.R;
import com.mjl.shops.bean.AddressBean;
import com.mjl.shops.bean.CollatorLeftBean;
import com.mjl.shops.bean.CollatorRightBean;
import com.mjl.shops.bean.CollectionBean;
import com.mjl.shops.bean.ConvertBean;
import com.mjl.shops.bean.ShopCarGoodsBean;
import com.mjl.shops.utils.JsonUtils;
import com.mjl.shops.utils.StringUtils;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

import static com.mjl.shops.utils.StringUtils.strJoining;

public class BaseDate {

    private static List<ShopCarGoodsBean> mGoods;

    public static List<ShopCarGoodsBean> getmGoods() {
        if (mGoods == null) {
            mGoods = new ArrayList<>();
        }
        setAddDate();
        return mGoods;
    }

    public static void setAddDate() {
        mGoods.clear();
        for (int i = 0; i < 20; i++) {
            ShopCarGoodsBean shopCarGoodsBean = new ShopCarGoodsBean();
            shopCarGoodsBean.setmGoodsId("1");
            shopCarGoodsBean.setmGoodsImg("");
            shopCarGoodsBean.setmGoodsName(strJoining("购物车商品", "" + i));
            shopCarGoodsBean.setmGoodsPrice(10.23);
            shopCarGoodsBean.setmGoodsSelect(1);
            mGoods.add(shopCarGoodsBean);
        }
    }

    public static List<String> getStr() {
        List<String> strs = new ArrayList<>();
        strs.add("螃蟹");
        strs.add("比目鱼");
        strs.add("苹果");
        strs.add("对虾");
        strs.add("火龙果");
        strs.add("平谷大桃");
        strs.add("炒栗子");
        strs.add("葡萄干");
        strs.add("核桃仁");
        strs.add("干瓜子");
        strs.add("开口笑");
        strs.add("炒花生");
        return strs;
    }

    public static List<AddressBean> getAddress() {
        List<AddressBean> addressBeans = new ArrayList<>();
        for (int i = 0; i < 15; i++) {
            AddressBean addressBean = new AddressBean();
            addressBean.setAddressId("" + i);
            if (i == 0) {
                addressBean.setIsDef(1);
            } else {
                addressBean.setIsDef(0);
            }
            addressBean.setUserName(StringUtils.strJoining("第", "" + i, "个地址信息"));
            addressBean.setUserPhone("18033623352");
            addressBean.setDetailAddress("北京市昌平区沙河镇");
            addressBean.setProvince("北京");
            addressBean.setCity("北京");
            addressBean.setCounty("昌平区");
            addressBeans.add(addressBean);
        }
        return addressBeans;
    }

    public static List<CollatorLeftBean> getCollatorLeftBeans() {

        List<CollatorLeftBean> collatorLeftBeans = new ArrayList<>();
        collatorLeftBeans.clear();
        collatorLeftBeans.add(new CollatorLeftBean("1", "热门", 1));
        collatorLeftBeans.add(new CollatorLeftBean("2", "休闲食品", 0));
        collatorLeftBeans.add(new CollatorLeftBean("3", "厨房用品", 0));
        collatorLeftBeans.add(new CollatorLeftBean("4", "粮油副食", 0));
        collatorLeftBeans.add(new CollatorLeftBean("5", "新鲜水果", 0));
        collatorLeftBeans.add(new CollatorLeftBean("6", "水产海鲜", 0));
        collatorLeftBeans.add(new CollatorLeftBean("7", "乳品饮料", 0));
        collatorLeftBeans.add(new CollatorLeftBean("8", "熟食面点", 0));
        collatorLeftBeans.add(new CollatorLeftBean("9", "新鲜蔬菜", 0));
        collatorLeftBeans.add(new CollatorLeftBean("10", "肉禽食品", 0));
        return collatorLeftBeans;

    }

    public static List<CollatorRightBean> getCollatorRightBeans() {
        List<CollatorRightBean> collatorRightBeans = new ArrayList<>();
        String ds = "{\n" +
                "    \"banner\":[\n" +
                "        {\n" +
                "            \"url\":\"https://fang.sojson.com\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"url\":\"https://fang.sojson.com\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"url\":\"https://fang.sojson.com\"\n" +
                "        }\n" +
                "    ],\n" +
                "    \"goods\":[\n" +
                "        {\n" +
                "            \"title\":\"休闲食品\",\n" +
                "            \"isAll\":1,\n" +
                "            \"good\":[\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                }\n" +
                "            ]\n" +
                "        },\n" +
                "        {\n" +
                "            \"title\":\"休闲食品\",\n" +
                "            \"isAll\":1,\n" +
                "            \"good\":[\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                }\n" +
                "            ]\n" +
                "        },\n" +
                "        {\n" +
                "            \"title\":\"休闲食品\",\n" +
                "            \"isAll\":1,\n" +
                "            \"good\":[\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                }\n" +
                "            ]\n" +
                "        },\n" +
                "        {\n" +
                "            \"title\":\"休闲食品\",\n" +
                "            \"isAll\":1,\n" +
                "            \"good\":[\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                }\n" +
                "            ]\n" +
                "        },\n" +
                "        {\n" +
                "            \"title\":\"休闲食品\",\n" +
                "            \"isAll\":1,\n" +
                "            \"good\":[\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                },\n" +
                "                {\n" +
                "                    \"id\":\"id1\",\n" +
                "                    \"name\":\"团圆仁小核桃仁礼盒216g\",\n" +
                "                    \"img\":\"https://fang.sojson.com\",\n" +
                "                    \"price\":25,\n" +
                "                    \"addNum\":1\n" +
                "                }\n" +
                "            ]\n" +
                "        }\n" +
                "    ]\n" +
                "}";

        try {
            JSONObject jsonObject = new JSONObject(ds);
            collatorRightBeans.addAll(JsonUtils.paresCollator(jsonObject));
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return collatorRightBeans;
    }

    public static List<Integer> getBanners() {
        List<Integer> banner = new ArrayList<>();
        banner.add(R.mipmap.mike);
        banner.add(R.mipmap.mike);
        banner.add(R.mipmap.mike);
        banner.add(R.mipmap.mike);
        banner.add(R.mipmap.mike);
        return banner;
    }

    public static List<CollectionBean> getCollectionBeans() {

        String coll = "{\n" +
                "    \"collection\":[\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":36,\n" +
                "            \"pay_person_num\":27,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":78,\n" +
                "            \"pay_person_num\":25,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":65,\n" +
                "            \"pay_person_num\":26,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":45,\n" +
                "            \"pay_person_num\":37,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":13,\n" +
                "            \"pay_person_num\":34,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":69,\n" +
                "            \"pay_person_num\":31,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":68,\n" +
                "            \"pay_person_num\":15,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":95,\n" +
                "            \"pay_person_num\":17,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":98,\n" +
                "            \"pay_person_num\":55,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":98,\n" +
                "            \"pay_person_num\":574,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":94,\n" +
                "            \"pay_person_num\":42,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":45,\n" +
                "            \"pay_person_num\":85,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":25,\n" +
                "            \"pay_person_num\":72,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":65,\n" +
                "            \"pay_person_num\":420,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":85,\n" +
                "            \"pay_person_num\":75,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":42,\n" +
                "            \"pay_person_num\":45,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":45,\n" +
                "            \"pay_person_num\":25,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":4245,\n" +
                "            \"pay_person_num\":44,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":5724,\n" +
                "            \"pay_person_num\":54,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":74,\n" +
                "            \"pay_person_num\":575,\n" +
                "            \"isSelect\":0\n" +
                "        },\n" +
                "        {\n" +
                "            \"goodsId\":\"collection\",\n" +
                "            \"url\":\"collection\",\n" +
                "            \"name\":\"新疆兵团玉和田大枣\",\n" +
                "            \"price\":78,\n" +
                "            \"pay_person_num\":25,\n" +
                "            \"isSelect\":0\n" +
                "        }\n" +
                "    ]\n" +
                "}";

        List<CollectionBean> collectionBeans = new ArrayList<>();
        try {
            JSONObject jsonObject = new JSONObject(coll);
            collectionBeans.addAll(JsonUtils.paresCollectionBean(jsonObject));
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return collectionBeans;
    }

    public static List<ConvertBean> getConversList() {

        List<ConvertBean> convertBeans = new ArrayList<>();

        String converString = "{\n" +
                "    \"convert\":[\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"顺丰快递\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"极兔快递\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"急速快递\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"国通快递\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"顺丰快递\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"百世快递\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"申通快递\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"韵达快递\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"中通快递\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"123456789\",\n" +
                "            \"activity_name\":\"很震撼的活动\",\n" +
                "            \"ticket_code\":\"5698749\",\n" +
                "            \"conver_date\":\"2020-07-08\",\n" +
                "            \"consignee_person\":\"小马哥\",\n" +
                "            \"consignee_address\":\"北京市昌平区沙河镇于辛庄\",\n" +
                "            \"consignee_state\":\"已发货\",\n" +
                "            \"express_code\":\"10256249736547\",\n" +
                "            \"express_company\":\"圆通快递\"\n" +
                "        }\n" +
                "    ]\n" +
                "}";
        try {
            JSONObject js = new JSONObject(converString);
            convertBeans.addAll(JsonUtils.paresConvertList(js));
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return convertBeans;
    }

    public static List<String> getHistory(String str) {
        List<String> stringList = new Gson().fromJson(str, new TypeToken<List<String>>() {}.getType());
        return stringList;
    }

}
